<extend name="Public/common" />
<block name="body">
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>邮件配置</h5>
                        <h5 style="float: right;"><a href="javascript:location.reload();"><i class="fa fa-refresh"></i></a></h5>
                    </div>
                    <div class="ibox-content">
                        <div class="form-horizontal">
                            <div class="form-group">
                                <label class="col-sm-2 control-label"><span style="color:red;">*</span>发件人</label>

                                <div class="col-sm-10">
                                    <input type="text" class="form-control" name="from_name" value="{$mail.from_name}" placeholder="" id="from_name" />
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label"><span style="color:red;">*</span>邮箱地址</label>

                                <div class="col-sm-10">
                                    <input type="text" class="form-control" name="from_name" value="{$mail.from}" placeholder="" id="from" />
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>

                            <div class="form-group">
                                <label class="col-sm-2 control-label"><span style="color:red;">*</span>SMTP服务器</label>

                                <div class="col-sm-10">
                                    <input type="text" class="form-control" name="host" value="{$mail.host}" placeholder="" >
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label"><span style="color:red;">*</span>连接方式</label>
                                <!--<input type="text" class="form-control" name="host" value="{$mail.host}" placeholder="" id="host">-->
                                <div clas="col-sm-10">
                                    <select name="city" class="form-control">
                                        <option value="">默认</option>
                                        <option value="ssl">ssl</option>
                                        <option value="tls">tls</option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label"><span style="color:red;">*</span>SMTP服务器端口</label>

                                <div class="col-sm-10">
                                    <input type="text" class="form-control" name="host" value="{$mail.host}" placeholder="" >
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label"><span style="color:red;">*</span>发件箱账号</label>

                                <div class="col-sm-10">
                                    <input type="text" class="form-control" name="host" value="{$mail.host}" placeholder="" >
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label"><span style="color:red;">*</span>密码</label>

                                <div class="col-sm-10">
                                    <input type="text" class="form-control" name="host" value="{$mail.host}" placeholder="" />
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-sm-4 col-sm-offset-2">
                                    <button class="btn btn-primary" id="save">保存内容</button>
                                    <button class="btn btn-white" type="button" onclick="mail_test();">测试</button>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script>
        //定义全局变量
        var GV = {
            system_siteconfig : "{:U('Mail/setting')}"
        };

        //重置操作
        function mail_test(){
            $("input[name='copyright']").val("");
            $("input[name='host']").val("");
            $("#count").val("");
        }
    </script>
    <script src="__JS__/http/system/siteconfig.js"></script>
</block>